# seasonal prediction - cos jeszcze nie działa
SeasonalPredict <- function(timeSeries){
  logSzf <-as.ts(timeSeries)
  (fit <- arima(logSzf, c(0, 1, 1),
                seasonal = list(order=c(0, 1 ,1), period=12)))
  update(fit, method = "CSS")
  pred <- predict(fit, n.ahead = 1)
  pred$pred
  return(as.vector(pred$pred))
}

# plot(google)
# ret <-ownPredict(google,SeasonalPredict,100,logTransform, logDeTransform)
# plot(ret$x2)
# lines(ret$y2)
# ret$aafe
